<template>
<!--  数据可视化地图-->
  <div id="container" class="map">xxx</div>
</template>

<script>
import AMap from 'AMap'

export default {
  methods: {
        // 初始化地图
    initMap() {
      this.map = new AMap.Map('container', {
        resizeEnable: true,
        zoom: 11,
        mapStyle: 'amap://styles/dark'
      })
      this.map.setCity('贵阳市')
    },
  },
  mounted () {
    this.initMap()
  }
}
</script>

<style lang="less" scoped>
  .map {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: #0e1014;
  }
</style>
